home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Examples / Locale / Languages / dansk.language.asm < prev    next >
Encoding:
Assembly Source File  |  1999-10-30  |  23.4 KB  |  1,086 lines

  1. *
  2. * COPYRIGHT:
  3. *
  4. *   Unless otherwise noted, all files are Copyright (c) 1999 Amiga, Inc.
  5. *   All rights reserved.
  6. *
  7. * DISCLAIMER:
  8. *
  9. *   This software is provided "as is". No representations or warranties
  10. *   are made with respect to the accuracy, reliability, performance,
  11. *   currentness, or operation of this software, and all use is at your
  12. *   own risk. Neither Amiga nor the authors assume any responsibility
  13. *   or liability whatsoever with respect to your use of this software.
  14. *
  15.  
  16.     SECTION    text,code
  17.  
  18. ;---------------------------------------------------------------------------
  19.  
  20.     NOLIST
  21.  
  22.     INCLUDE    "exec/types.i"
  23.     INCLUDE    "exec/libraries.i"
  24.     INCLUDE    "exec/lists.i"
  25.     INCLUDE    "exec/alerts.i"
  26.     INCLUDE    "exec/initializers.i"
  27.     INCLUDE    "exec/resident.i"
  28.     INCLUDE    "exec/macros.i"
  29.     INCLUDE    "libraries/dos.i"
  30.     INCLUDE "locale/languagedrivers.i"
  31.  
  32.     INCLUDE    "dansk.language_rev.i"
  33.  
  34.     LIST
  35.  
  36. ;---------------------------------------------------------------------------
  37.  
  38.    STRUCTURE DriverBase,LIB_SIZE
  39.     ULONG   db_SegList
  40.     ULONG   db_SysLib
  41.    LABEL DriverBase_SIZEOF
  42.  
  43. ;---------------------------------------------------------------------------
  44.  
  45. ; First executable location, must return an error to the caller
  46. Start:
  47.     moveq   #-1,d0
  48.     rts
  49.  
  50. ;-----------------------------------------------------------------------
  51.  
  52. ROMTAG:
  53.     DC.W    RTC_MATCHWORD        ; UWORD RT_MATCHWORD
  54.     DC.L    ROMTAG            ; APTR  RT_MATCHTAG
  55.     DC.L    ENDTAG            ; APTR  RT_ENDSKIP
  56.     DC.B    RTF_AUTOINIT        ; UBYTE RT_FLAGS
  57.     DC.B    VERSION            ; UBYTE RT_VERSION
  58.     DC.B    NT_LIBRARY        ; UBYTE RT_TYPE
  59.     DC.B    LibPriority        ; BYTE  RT_PRI
  60.     DC.L    LibName            ; APTR  RT_NAME
  61.     DC.L    LibId            ; APTR  RT_IDSTRING
  62.     DC.L    LibInitTable        ; APTR  RT_INIT
  63.  
  64. LibName     DC.B "dansk.language",0
  65. LibId       VSTRING
  66. LibPriority EQU -100
  67.  
  68.     CNOP    0,4
  69.  
  70. LibInitTable:
  71.     DC.L    DriverBase_SIZEOF ; size of library base data space
  72.     DC.L    LibFuncTable
  73.     DC.L    LibDataTable
  74.     DC.L    LibInit
  75.  
  76. LibFuncTable:
  77.     DC.W    -1
  78.     DC.W    LibOpen-LibFuncTable
  79.     DC.W    LibClose-LibFuncTable
  80.     DC.W    LibExpunge-LibFuncTable
  81.     DC.W    LibReserved-LibFuncTable
  82.  
  83.     DC.W    GetDriverInfo-LibFuncTable    ; GetDriverInfo()
  84.     DC.W    LibReserved-LibFuncTable    ; ConvToLower()
  85.     DC.W    LibReserved-LibFuncTable    ; ConvToUpper()
  86.     DC.W    LibReserved-LibFuncTable    ; GetCodeSet()
  87.     DC.W    GetLocaleStr-LibFuncTable    ; GetLocaleStr()
  88.     DC.W    LibReserved-LibFuncTable    ; IsAlNum()
  89.     DC.W    LibReserved-LibFuncTable    ; IsAlpha()
  90.     DC.W    LibReserved-LibFuncTable    ; IsCntrl()
  91.     DC.W    LibReserved-LibFuncTable    ; IsDigit()
  92.     DC.W    LibReserved-LibFuncTable    ; IsGraph()
  93.     DC.W    LibReserved-LibFuncTable    ; IsLower()
  94.     DC.W    LibReserved-LibFuncTable    ; IsPrint()
  95.     DC.W    LibReserved-LibFuncTable    ; IsPunct()
  96.     DC.W    LibReserved-LibFuncTable    ; IsSpace()
  97.     DC.W    LibReserved-LibFuncTable    ; IsUpper()
  98.     DC.W    LibReserved-LibFuncTable    ; IsXDigit()
  99.     DC.W    StrConvert-LibFuncTable        ; StrConvert()
  100.     DC.W    StrnCmp-LibFuncTable        ; StrnCmp()
  101.  
  102.     DC.W   -1
  103.  
  104. LibDataTable:
  105.     INITBYTE   LN_PRI,LibPriority
  106.     INITBYTE   LN_TYPE,NT_LIBRARY
  107.     INITLONG   LN_NAME,LibName
  108.     INITBYTE   LIB_FLAGS,(LIBF_SUMUSED!LIBF_CHANGED)
  109.     INITWORD   LIB_VERSION,VERSION
  110.     INITWORD   LIB_REVISION,REVISION
  111.     INITLONG   LIB_IDSTRING,LibId
  112.     DC.W       0
  113.  
  114.     CNOP    0,4
  115.  
  116. ;-----------------------------------------------------------------------
  117.  
  118. ; Library Init entry point called when library is first loaded in memory
  119. ; On entry, D0 points to library base, A0 has lib seglist, A6 has SysBase
  120. ; Returns 0 for failure or the library base for success.
  121. LibInit:
  122.     move.l    d0,a1
  123.         move.l    a0,db_SegList(a1)
  124.         move.l    a6,db_SysLib(a1)
  125.     rts
  126.  
  127. ;-----------------------------------------------------------------------
  128.  
  129. ; Library open entry point called every OpenLibrary()
  130. ; On entry, A6 has DriverBase, task switching is disabled
  131. ; Returns 0 for failure, or DriverBase for success.
  132. LibOpen:
  133.     addq.w    #1,LIB_OPENCNT(a6)
  134.     bclr    #LIBB_DELEXP,LIB_FLAGS(a6)
  135.     move.l    a6,d0
  136.     rts
  137.  
  138. ;-----------------------------------------------------------------------
  139.  
  140. ; Library close entry point called every CloseLibrary()
  141. ; On entry, A6 has DriverBase, task switching is disabled
  142. ; Returns 0 normally, or the library seglist when lib should be expunged
  143. ;   due to delayed expunge bit being set
  144. LibClose:
  145.     subq.w    #1,LIB_OPENCNT(a6)
  146.  
  147.     ; if delayed expunge bit set, then try to get rid of the library
  148.     btst    #LIBB_DELEXP,LIB_FLAGS(a6)
  149.     bne.s    CloseExpunge
  150.     moveq    #0,d0
  151.     rts
  152.  
  153. CloseExpunge:
  154.     ; if no library users, then just remove the library
  155.     tst.w    LIB_OPENCNT(a6)
  156.     beq.s    DoExpunge
  157.  
  158.     ; still some library users, so just return
  159.     moveq    #0,d0
  160.     rts
  161.  
  162. ;-----------------------------------------------------------------------
  163.  
  164. ; Library expunge entry point called whenever system memory is lacking
  165. ; On entry, A6 has LocaleBase, task switching is disabled
  166. ; Returns the library seglist if the library open count is 0, returns 0
  167. ; otherwise and sets the delayed expunge bit.
  168. LibExpunge:
  169.     tst.w    LIB_OPENCNT(a6)
  170.     beq.s    DoExpunge
  171.  
  172.     bset    #LIBB_DELEXP,LIB_FLAGS(a6)
  173.     moveq    #0,d0
  174.     rts
  175.  
  176. DoExpunge:
  177.     movem.l    d2/a5/a6,-(sp)
  178.     move.l    a6,a5
  179.     move.l    db_SysLib(a5),a6
  180.     move.l    db_SegList(a5),d2
  181.  
  182.     move.l  a5,a1
  183.     REMOVE
  184.  
  185.     move.l    a5,a1
  186.     moveq    #0,d0
  187.     move.w    LIB_NEGSIZE(a5),d0
  188.     sub.l    d0,a1
  189.     add.w    LIB_POSSIZE(a5),d0
  190.     JSRLIB    FreeMem
  191.  
  192.     move.l    d2,d0
  193.     movem.l    (sp)+,d2/a5/a6
  194.     rts
  195.  
  196. ;---------------------------------------------------------------------------
  197.  
  198. LibReserved:
  199.     moveq    #0,d0
  200.     rts
  201.  
  202. ;---------------------------------------------------------------------------
  203.  
  204. GetDriverInfo:
  205.     move.l    #GDIF_STRNCMP!GDIF_STRCONVERT!GDIF_GETLOCALESTR,d0
  206.     rts
  207.  
  208. ;---------------------------------------------------------------------------
  209.  
  210.  
  211. *    result = StrnCmp(driver,string1,string2,length,type);
  212. *    D0               A0     A1      A2      D0     D1
  213. *
  214. *    LONG StrnCmp(struct DriverBase *,STRPTR,STRPTR,LONG,ULONG);
  215. *
  216.  
  217. StrnCmp:
  218.  
  219.     tst.l    d0            ; if length = 0, then exit
  220.     bne.s    Ascii
  221.     rts
  222.  
  223. Ascii:
  224.     tst.l    d1
  225.     bne.s    Collate1
  226.  
  227.     movem.l    a2/d2,-(sp)        ; save work registers
  228.     lea    LowerToUpper(pc),a0    ; conversion table address
  229.     moveq.l    #0,d2            ; clear all bits
  230. 1$:    move.b    (a1)+,d1        ; get next character from 1st string
  231.     move.b    (a2)+,d2        ; get next character from 2nd string
  232. 2$:    move.b    0(a0,d1.w),d1        ; get sort value
  233.     cmp.b    0(a0,d2.w),d1        ; compare chars
  234.     bne.s    4$            ; if they're not the same, exit loop
  235.     tst.b    d1            ; they're the same, now check if they are NULL
  236.     beq.s    3$            ; if they are NULL, then exit with a result of 0
  237.     subq.l    #1,d0            ; remove one from length
  238.     bne.s    1$            ; if length > 0
  239.     movem.l    (sp)+,a2/d2        ; restore saved registers
  240.     rts                ; bye
  241.  
  242. 3$:    moveq.l    #0,d0            ; strings are equal
  243.     movem.l    (sp)+,a2/d2        ; restore saved registers
  244.     rts                ; bye
  245.  
  246. 4$:    bhi.s    5$
  247.     moveq.l    #-1,d0
  248.     movem.l    (sp)+,a2/d2        ; restore saved registers
  249.     rts                ; bye
  250.  
  251. 5$:    moveq.l    #1,d0
  252.     movem.l    (sp)+,a2/d2        ; restore saved registers
  253.     rts                ; bye
  254.  
  255. Collate1:
  256.     subq.l    #1,d1
  257.     bne.s    Collate2
  258.  
  259.     movem.l    a2/d2,-(sp)        ; save work registers
  260.     lea    Collate1Table(pc),a0    ; conversion table address
  261.     moveq.l    #0,d2            ; clear all bits
  262. 1$:    move.b    (a1)+,d1        ; get next character from 1st string
  263.     move.b    (a2)+,d2        ; get next character from 2nd string
  264. 2$:    move.b    0(a0,d1.w),d1        ; get sort value
  265.     cmp.b    0(a0,d2.w),d1        ; compare chars
  266.     bne.s    4$            ; if they're not the same, exit loop
  267.     tst.b    d1            ; they're the same, now check if they are NULL
  268.     beq.s    3$            ; if they are NULL, then exit with a result of 0
  269.     subq.l    #1,d0            ; remove one from length
  270.     bne.s    1$            ; if length > 0
  271.     movem.l    (sp)+,a2/d2        ; restore saved registers
  272.     rts                ; bye
  273.  
  274. 3$:    moveq.l    #0,d0            ; strings are equal
  275.     movem.l    (sp)+,a2/d2        ; restore saved registers
  276.     rts                ; bye
  277.  
  278. 4$:    bhi.s    5$
  279.     moveq.l    #-1,d0
  280.     movem.l    (sp)+,a2/d2        ; restore saved registers
  281.     rts                ; bye
  282.  
  283. 5$:    moveq.l    #1,d0
  284.     movem.l    (sp)+,a2/d2        ; restore saved registers
  285.     rts                ; bye
  286.  
  287. Collate2:
  288.     subq.l    #1,d1
  289.     bne.s    Nothing
  290.  
  291.     movem.l    a2/d2/d3,-(sp)        ; save work registers
  292.     lea    Collate1Table(pc),a0    ; conversion table address
  293.     moveq.l    #0,d2            ; clear all bits
  294.     moveq.l    #0,d3
  295.  
  296. 1$:    move.b    (a1)+,d1        ; get next character from 1st string
  297.     beq.s    11$            ; if char is NULL, exit
  298.     move.b    (a2)+,d2        ; get next character from 2nd string
  299.     cmp.b    d2,d1            ; are the chars different
  300.     bne.s    10$            ; if so, then exit loop
  301.     subq.l    #1,d0            ; remove one from length
  302.     bne.s    1$            ; if length > 0
  303.     movem.l    (sp)+,a2/d2/d3        ; restore saved registers
  304.     rts                ; bye
  305.  
  306. 11$:    cmp.b    (a2)+,d1        ; are the chars different
  307.     bne.s    10$
  308.     movem.l    (sp)+,a2/d2/d3        ; restore saved registers
  309.     moveq.l    #0,d0
  310.     rts
  311.  
  312. 10$:    bhi.s    2$
  313.     moveq.l    #-1,d3
  314.     bra.s    4$
  315.  
  316. 2$:    moveq.l    #1,d3
  317.     bra.s    4$
  318.  
  319. 3$:     move.b    (a1)+,d1        ; get next character from 1st string
  320.     move.b    (a2)+,d2        ; get next character from 2nd string
  321. 4$:    move.b    0(a0,d1.w),d1        ; get sort value
  322.     cmp.b    0(a0,d2.w),d1        ; compare chars
  323.     bne.s    6$            ; if they're not the same, exit loop
  324.     tst.b    d1            ; they're the same, now check if they are NULL
  325.     beq.s    5$            ; if they are NULL, then exit with a result of 0
  326.     subq.l    #1,d0            ; remove one from length
  327.     bne.s    3$            ; if length > 0
  328.  
  329. 5$:    move.l    d3,d0            ; strings are equal
  330.     movem.l    (sp)+,a2/d2/d3        ; restore saved registers
  331.     rts                ; bye
  332.  
  333. 6$:    bhi.s    7$
  334.     moveq.l    #-1,d0
  335.     movem.l    (sp)+,a2/d2/d3        ; restore saved registers
  336.     rts                ; bye
  337.  
  338. 7$:    moveq.l    #1,d0
  339.     movem.l    (sp)+,a2/d2/d3        ; restore saved registers
  340.     rts                ; bye
  341.  
  342. Nothing:
  343.     moveq    #0,d0
  344.     rts
  345.  
  346.  
  347. ;---------------------------------------------------------------------------
  348.  
  349. *    length = StrConvert(driver,string,buffer,bufferSize,type);
  350. *    D0                  A0     A1     A2     D0         D1
  351. *
  352. *    ULONG StrConvert(struct DriverBase *,STRPTR,APTR,ULONG,ULONG);
  353. *
  354.  
  355. StrConvert:
  356.  
  357.     move.l    d0,-(sp)        ; save buffer size
  358.      bne.s    XAscii            ; if bufferSize > 0, keep going
  359.     addq.l    #4,sp            ; clear stack
  360.     rts
  361.  
  362. XAscii:
  363.     tst.l    d1            ; is d1 = 0?
  364.     bne.s    XCollate1        ; if not, then not SC_ASCII compare
  365.     move.l    a2,-(sp)        ; save a2 cause we need to use it
  366.     lea    LowerToUpper(pc),a0    ; conversion table
  367.     bra.s    XEndCollLoop        ; enter copy loop
  368.  
  369. XCollate1:
  370.     subq.l    #1,d1            ; remove 1 from compare type
  371.     bne.s    XCollate2        ; if d1 is not 0, then not SC_COLLATE1 compare
  372.     move.l    a2,-(sp)        ; save a2 cause we need to use it
  373.     lea    Collate1Table(pc),a0    ; conversion table
  374.     bra.s    XEndCollLoop        ; enter loop
  375.  
  376. XCollLoop:
  377.     move.b    (a1)+,d1        ; get next character
  378.     beq.s    XAfterCollLoop        ; if null, then exit
  379.     move.b    0(a0,d1.w),(a2)+    ; convert char to uppercase and put in dest array
  380. XEndCollLoop:
  381.     subq.l    #1,d0            ; remove one from bufferSize
  382.     bne.s    XCollLoop        ; if bufferSize > 0, keep looping
  383. XAfterCollLoop:
  384.     clr.b    (a2)            ; clear last byte
  385.     move.l    (sp)+,a2        ; restore original value
  386.     move.l    (sp)+,d1        ; obtain original bufferSize value
  387.     sub.l    d0,d1            ; subtract current bufferSize value
  388.     move.l    d1,d0            ; put result in d0
  389.     rts                ; bye
  390.  
  391. XCollate2:
  392.     subq.l    #1,d1
  393.     bne.s    XNothing
  394.     movem.l    a2/a3/d2,-(sp)        ; save these dudes for later
  395.  
  396.     ; get length of input string
  397.     move.l    a1,a0            ; address of string
  398. 0$:    tst.b    (a0)+
  399.     bne.s    0$
  400.     sub.l    a1,a0            ; length = adr of NUL - adr of start - 1
  401.     subq.l    #1,a0
  402.     move.l    a2,a3            ; a3 has dest buffer
  403.     add.l    a0,a3            ; a3 has dest buffer + length which is
  404.                     ; the second half of the buffer
  405.  
  406.     lea    Collate1Table(pc),a0    ; conversion table
  407.     bra.s    2$            ; enter loop
  408.  
  409. 1$:    move.b    (a1)+,d1        ; get next character
  410.     beq.s    3$            ; if null, then exit
  411.     move.b    0(a0,d1.w),d2         ; convert char to uppercase and put in d2
  412.     move.b  d2,(a2)+        ; move converted char to dest
  413.     cmp.b    d2,d1            ; does converted char match original?
  414.     beq.s    2$            ; if so, then forget it
  415.     move.b    d1,(a3)+        ; put original char in second half of buffer
  416.     subq.l    #1,d0            ; remove one from bufferSize
  417.     beq.s    3$
  418.  
  419. 2$:    subq.l    #1,d0            ; remove one from bufferSize
  420.     bne.s    1$            ; if bufferSize > 0, keep looping
  421.  
  422. 3$:    clr.b    (a3)            ; clear last byte
  423.     movem.l (sp)+,d2/a3/a2          ; restore original values
  424.     move.l    (sp)+,d1        ; obtain original bufferSize value
  425.     sub.l    d0,d1            ; subtract current bufferSize value
  426.     move.l    d1,d0            ; put result in d0
  427.     rts                ; bye
  428.  
  429. XNothing:
  430.     moveq    #0,d0
  431.     rts
  432.  
  433. Collate1Table:
  434. C000 DC.B   0
  435. C001 DC.B   1
  436. C002 DC.B   2
  437. C003 DC.B   3
  438. C004 DC.B   4
  439. C005 DC.B   5
  440. C006 DC.B   6
  441. C007 DC.B   7
  442. C008 DC.B   8
  443. C009 DC.B   9
  444. C010 DC.B   10
  445. C011 DC.B   11
  446. C012 DC.B   12
  447. C013 DC.B   13
  448. C014 DC.B   14
  449. C015 DC.B   15
  450. C016 DC.B   16
  451. C017 DC.B   17
  452. C018 DC.B   18
  453. C019 DC.B   19
  454. C020 DC.B   20
  455. C021 DC.B   21
  456. C022 DC.B   22
  457. C023 DC.B   23
  458. C024 DC.B   24
  459. C025 DC.B   25
  460. C026 DC.B   26
  461. C027 DC.B   27
  462. C028 DC.B   28
  463. C029 DC.B   29
  464. C030 DC.B   30
  465. C031 DC.B   31
  466. C032 DC.B   32  ; " "
  467. C033 DC.B   33  ; "!"
  468. C034 DC.B   34  ; '"'
  469. C035 DC.B   35  ; "#"
  470. C036 DC.B   36  ; "$"
  471. C037 DC.B   37  ; "%"
  472. C038 DC.B   38  ; "&"
  473. C039 DC.B   39  ; "'"
  474. C040 DC.B   40  ; "("
  475. C041 DC.B   41  ; ")"
  476. C042 DC.B   42  ; "*"
  477. C043 DC.B   43  ; "+"
  478. C044 DC.B   44  ; ","
  479. C045 DC.B   45  ; "-"
  480. C046 DC.B   46  ; "."
  481. C047 DC.B   47  ; "/"
  482. C048 DC.B   48  ; "0"
  483. C049 DC.B   49  ; "1"
  484. C050 DC.B   50  ; "2"
  485. C051 DC.B   51  ; "3"
  486. C052 DC.B   52  ; "4"
  487. C053 DC.B   53  ; "5"
  488. C054 DC.B   54  ; "6"
  489. C055 DC.B   55  ; "7"
  490. C056 DC.B   56  ; "8"
  491. C057 DC.B   57  ; "9"
  492. C058 DC.B   58  ; ":"
  493. C059 DC.B   59  ; ";"
  494. C060 DC.B   60  ; "<"
  495. C061 DC.B   61  ; "="
  496. C062 DC.B   62  ; ">"
  497. C063 DC.B   63  ; "?"
  498. C064 DC.B   64  ; "@"
  499. C065 DC.B   65  ; "A"
  500. C066 DC.B   66  ; "B"
  501. C067 DC.B   67  ; "C"
  502. C068 DC.B   68  ; "D"
  503. C069 DC.B   69  ; "E"
  504. C070 DC.B   70  ; "F"
  505. C071 DC.B   71  ; "G"
  506. C072 DC.B   72  ; "H"
  507. C073 DC.B   73  ; "I"
  508. C074 DC.B   74  ; "J"
  509. C075 DC.B   75  ; "K"
  510. C076 DC.B   76  ; "L"
  511. C077 DC.B   77  ; "M"
  512. C078 DC.B   78  ; "N"
  513. C079 DC.B   79  ; "O"
  514. C080 DC.B   80  ; "P"
  515. C081 DC.B   81  ; "Q"
  516. C082 DC.B   82  ; "R"
  517. C083 DC.B   83  ; "S"
  518. C084 DC.B   84  ; "T"
  519. C085 DC.B   85  ; "U"
  520. C086 DC.B   86  ; "V"
  521. C087 DC.B   87  ; "W"
  522. C088 DC.B   88  ; "X"
  523. C089 DC.B   89  ; "Y"
  524. C090 DC.B   90  ; "Z"
  525. C091 DC.B   94  ; "["
  526. C092 DC.B   95  ; "\"
  527. C093 DC.B   96  ; "]"
  528. C094 DC.B   97  ; "^"
  529. C095 DC.B   98  ; "_"
  530. C096 DC.B   99  ; "`"
  531. C097 DC.B   65  ; "a"
  532. C098 DC.B   66  ; "b"
  533. C099 DC.B   67  ; "c"
  534. C100 DC.B   68  ; "d"
  535. C101 DC.B   69  ; "e"
  536. C102 DC.B   70  ; "f"
  537. C103 DC.B   71  ; "g"
  538. C104 DC.B   72  ; "h"
  539. C105 DC.B   73  ; "i"
  540. C106 DC.B   74  ; "j"
  541. C107 DC.B   75  ; "k"
  542. C108 DC.B   76  ; "l"
  543. C109 DC.B   77  ; "m"
  544. C110 DC.B   78  ; "n"
  545. C111 DC.B   79  ; "o"
  546. C112 DC.B   80  ; "p"
  547. C113 DC.B   81  ; "q"
  548. C114 DC.B   82  ; "r"
  549. C115 DC.B   83  ; "s"
  550. C116 DC.B   84  ; "t"
  551. C117 DC.B   85  ; "u"
  552. C118 DC.B   86  ; "v"
  553. C119 DC.B   87  ; "w"
  554. C120 DC.B   88  ; "x"
  555. C121 DC.B   89  ; "y"
  556. C122 DC.B   90  ; "z"
  557. C123 DC.B   100 ; "{"
  558. C124 DC.B   101 ; "|"
  559. C125 DC.B   102 ; "}"
  560. C126 DC.B   103 ; "~"
  561. C127 DC.B   104 ; DEL
  562. C128 DC.B   224
  563. C129 DC.B   225
  564. C130 DC.B   226
  565. C131 DC.B   227
  566. C132 DC.B   228
  567. C133 DC.B   229
  568. C134 DC.B   230
  569. C135 DC.B   231
  570. C136 DC.B   232
  571. C137 DC.B   233
  572. C138 DC.B   234
  573. C139 DC.B   235
  574. C140 DC.B   236
  575. C141 DC.B   237
  576. C142 DC.B   238
  577. C143 DC.B   239
  578. C144 DC.B   240
  579. C145 DC.B   241
  580. C146 DC.B   242
  581. C147 DC.B   243
  582. C148 DC.B   244
  583. C149 DC.B   245
  584. C150 DC.B   246
  585. C151 DC.B   247
  586. C152 DC.B   248
  587. C153 DC.B   249
  588. C154 DC.B   250
  589. C155 DC.B   251
  590. C156 DC.B   252
  591. C157 DC.B   253
  592. C158 DC.B   254
  593. C159 DC.B   255
  594. C160 DC.B   32  ; " " (hard space)
  595. C161 DC.B   33  ; "¡"
  596. C162 DC.B   36  ; "¢"
  597. C163 DC.B   36  ; "£"
  598. C164 DC.B   105 ; "¤"
  599. C165 DC.B   106 ; "¥"
  600. C166 DC.B   107 ; "¦"
  601. C167 DC.B   83  ; "§"
  602. C168 DC.B   108 ; "¨"
  603. C169 DC.B   109 ; "©"
  604. C170 DC.B   110 ; "ª"
  605. C171 DC.B   34  ; "«"
  606. C172 DC.B   111 ; "¬"
  607. C173 DC.B   112 ; "­"
  608. C174 DC.B   113 ; "®"
  609. C175 DC.B   114 ; "¯"
  610. C176 DC.B   115 ; "°"
  611. C177 DC.B   116 ; "±"
  612. C178 DC.B   117 ; "²"
  613. C179 DC.B   118 ; "³"
  614. C180 DC.B   119 ; "´"
  615. C181 DC.B   120 ; "µ"
  616. C182 DC.B   121 ; "¶"
  617. C183 DC.B   122 ; "·"
  618. C184 DC.B   123 ; "¸"
  619. C185 DC.B   124 ; "¹"
  620. C186 DC.B   125 ; "º"
  621. C187 DC.B   34  ; "»"
  622. C188 DC.B   126 ; "¼"
  623. C189 DC.B   127 ; "½"
  624. C190 DC.B   128 ; "¾"
  625. C191 DC.B   63  ; "¿"
  626. C192 DC.B   65  ; "À"
  627. C193 DC.B   65  ; "Á"
  628. C194 DC.B   65  ; "Â"
  629. C195 DC.B   65  ; "Ã"
  630. C196 DC.B   65  ; "Ä"
  631. C197 DC.B   93  ; "Å"
  632. C198 DC.B   91  ; "Æ"
  633. C199 DC.B   67  ; "Ç"
  634. C200 DC.B   69  ; "È"
  635. C201 DC.B   69  ; "É"
  636. C202 DC.B   69  ; "Ê"
  637. C203 DC.B   69  ; "Ë"
  638. C204 DC.B   73  ; "Ì"
  639. C205 DC.B   73  ; "Í"
  640. C206 DC.B   73  ; "Î"
  641. C207 DC.B   73  ; "Ï"
  642. C208 DC.B   68  ; "Ð"
  643. C209 DC.B   78  ; "Ñ"
  644. C210 DC.B   79  ; "Ò"
  645. C211 DC.B   79  ; "Ó"
  646. C212 DC.B   79  ; "Ô"
  647. C213 DC.B   79  ; "Õ"
  648. C214 DC.B   79  ; "Ö"
  649. C215 DC.B   47  ; "×"
  650. C216 DC.B   92  ; "Ø"
  651. C217 DC.B   85  ; "Ù"
  652. C218 DC.B   85  ; "Ú"
  653. C219 DC.B   85  ; "Û"
  654. C220 DC.B   85  ; "Ü"
  655. C221 DC.B   89  ; "Ý"
  656. C222 DC.B   80  ; "Þ"
  657. C223 DC.B   89  ; "ß"
  658. C224 DC.B   65  ; "à"
  659. C225 DC.B   65  ; "á"
  660. C226 DC.B   65  ; "â"
  661. C227 DC.B   65  ; "ã"
  662. C228 DC.B   65  ; "ä"
  663. C229 DC.B   93  ; "å"
  664. C230 DC.B   91  ; "æ"
  665. C231 DC.B   67  ; "ç"
  666. C232 DC.B   69  ; "è"
  667. C233 DC.B   69  ; "é"
  668. C234 DC.B   69  ; "ê"
  669. C235 DC.B   69  ; "ë"
  670. C236 DC.B   73  ; "ì"
  671. C237 DC.B   73  ; "í"
  672. C238 DC.B   73  ; "î"
  673. C239 DC.B   73  ; "ï"
  674. C240 DC.B   68  ; "ð"
  675. C241 DC.B   78  ; "ñ"
  676. C242 DC.B   79  ; "ò"
  677. C243 DC.B   79  ; "ó"
  678. C244 DC.B   79  ; "ô"
  679. C245 DC.B   79  ; "õ"
  680. C246 DC.B   79  ; "ö"
  681. C247 DC.B   47  ; "÷"
  682. C248 DC.B   92  ; "ø"
  683. C249 DC.B   85  ; "ù"
  684. C250 DC.B   85  ; "ú"
  685. C251 DC.B   85  ; "û"
  686. C252 DC.B   85  ; "ü"
  687. C253 DC.B   89  ; "ý"
  688. C254 DC.B   80  ; "þ"
  689. C255 DC.B   89  ; "ÿ"
  690.  
  691. LowerToUpper:
  692. L000 DC.B    0
  693. L001 DC.B    1
  694. L002 DC.B    2
  695. L003 DC.B    3
  696. L004 DC.B    4
  697. L005 DC.B    5
  698. L006 DC.B    6
  699. L007 DC.B    7
  700. L008 DC.B    8
  701. L009 DC.B    9
  702. L010 DC.B    10
  703. L011 DC.B    11
  704. L012 DC.B    12
  705. L013 DC.B    13
  706. L014 DC.B    14
  707. L015 DC.B    15
  708. L016 DC.B    16
  709. L017 DC.B    17
  710. L018 DC.B    18
  711. L019 DC.B    19
  712. L020 DC.B    20
  713. L021 DC.B    21
  714. L022 DC.B    22
  715. L023 DC.B    23
  716. L024 DC.B    24
  717. L025 DC.B    25
  718. L026 DC.B    26
  719. L027 DC.B    27
  720. L028 DC.B    28
  721. L029 DC.B    29
  722. L030 DC.B    30
  723. L031 DC.B    31
  724. L032 DC.B    " "
  725. L033 DC.B    "!"
  726. L034 DC.B    '"'
  727. L035 DC.B    "#"
  728. L036 DC.B       "$"
  729. L037 DC.B       "%"
  730. L038 DC.B       "&"
  731. L039 DC.B       "'"
  732. L040 DC.B       "("
  733. L041 DC.B       ")"
  734. L042 DC.B       "*"
  735. L043 DC.B       "+"
  736. L044 DC.B       ","
  737. L045 DC.B       "-"
  738. L046 DC.B       "."
  739. L047 DC.B       "/"
  740. L048 DC.B       "0"
  741. L049 DC.B       "1"
  742. L050 DC.B       "2"
  743. L051 DC.B       "3"
  744. L052 DC.B       "4"
  745. L053 DC.B       "5"
  746. L054 DC.B       "6"
  747. L055 DC.B       "7"
  748. L056 DC.B       "8"
  749. L057 DC.B       "9"
  750. L058 DC.B       ":"
  751. L059 DC.B       ";"
  752. L060 DC.B       "<"
  753. L061 DC.B       "="
  754. L062 DC.B       ">"
  755. L063 DC.B       "?"
  756. L064 DC.B       "@"
  757. L065 DC.B       "A"
  758. L066 DC.B       "B"
  759. L067 DC.B       "C"
  760. L068 DC.B       "D"
  761. L069 DC.B       "E"
  762. L070 DC.B       "F"
  763. L071 DC.B       "G"
  764. L072 DC.B       "H"
  765. L073 DC.B       "I"
  766. L074 DC.B       "J"
  767. L075 DC.B       "K"
  768. L076 DC.B       "L"
  769. L077 DC.B       "M"
  770. L078 DC.B       "N"
  771. L079 DC.B       "O"
  772. L080 DC.B       "P"
  773. L081 DC.B       "Q"
  774. L082 DC.B       "R"
  775. L083 DC.B       "S"
  776. L084 DC.B       "T"
  777. L085 DC.B       "U"
  778. L086 DC.B       "V"
  779. L087 DC.B       "W"
  780. L088 DC.B       "X"
  781. L089 DC.B       "Y"
  782. L090 DC.B       "Z"
  783. L091 DC.B       "["
  784. L092 DC.B       "\"
  785. L093 DC.B       "]"
  786. L094 DC.B       "^"
  787. L095 DC.B       "_"
  788. L096 DC.B       "`"
  789. L097 DC.B       "A"
  790. L098 DC.B       "B"
  791. L099 DC.B       "C"
  792. L100 DC.B       "D"
  793. L101 DC.B       "E"
  794. L102 DC.B       "F"
  795. L103 DC.B       "G"
  796. L104 DC.B       "H"
  797. L105 DC.B       "I"
  798. L106 DC.B       "J"
  799. L107 DC.B       "K"
  800. L108 DC.B       "L"
  801. L109 DC.B       "M"
  802. L110 DC.B       "N"
  803. L111 DC.B       "O"
  804. L112 DC.B       "P"
  805. L113 DC.B       "Q"
  806. L114 DC.B       "R"
  807. L115 DC.B       "S"
  808. L116 DC.B       "T"
  809. L117 DC.B       "U"
  810. L118 DC.B       "V"
  811. L119 DC.B       "W"
  812. L120 DC.B       "X"
  813. L121 DC.B       "Y"
  814. L122 DC.B       "Z"
  815. L123 DC.B       "{"
  816. L124 DC.B       "|"
  817. L125 DC.B       "}"
  818. L126 DC.B       "~"
  819. L127 DC.B    127
  820. L128 DC.B    128
  821. L129 DC.B    129
  822. L130 DC.B    130
  823. L131 DC.B    131
  824. L132 DC.B    132
  825. L133 DC.B    133
  826. L134 DC.B    134
  827. L135 DC.B    135
  828. L136 DC.B    136
  829. L137 DC.B    137
  830. L138 DC.B    138
  831. L139 DC.B    139
  832. L140 DC.B    140
  833. L141 DC.B    141
  834. L142 DC.B    142
  835. L143 DC.B    143
  836. L144 DC.B    144
  837. L145 DC.B    145
  838. L146 DC.B    146
  839. L147 DC.B    147
  840. L148 DC.B    148
  841. L149 DC.B    149
  842. L150 DC.B    150
  843. L151 DC.B    151
  844. L152 DC.B    152
  845. L153 DC.B    153
  846. L154 DC.B    154
  847. L155 DC.B    155
  848. L156 DC.B    156
  849. L157 DC.B    157
  850. L158 DC.B    158
  851. L159 DC.B    159
  852. L160 DC.B       " "
  853. L161 DC.B       "¡"
  854. L162 DC.B       "¢"
  855. L163 DC.B       "£"
  856. L164 DC.B       "¤"
  857. L165 DC.B       "¥"
  858. L166 DC.B       "¦"
  859. L167 DC.B       "§"
  860. L168 DC.B       "¨"
  861. L169 DC.B       "©"
  862. L170 DC.B       "ª"
  863. L171 DC.B       "«"
  864. L172 DC.B       "¬"
  865. L173 DC.B       "­"
  866. L174 DC.B       "®"
  867. L175 DC.B       "¯"
  868. L176 DC.B       "°"
  869. L177 DC.B       "±"
  870. L178 DC.B       "²"
  871. L179 DC.B       "³"
  872. L180 DC.B       "´"
  873. L181 DC.B       "µ"
  874. L182 DC.B       "¶"
  875. L183 DC.B       "·"
  876. L184 DC.B       "¸"
  877. L185 DC.B       "¹"
  878. L186 DC.B       "º"
  879. L187 DC.B       "»"
  880. L188 DC.B       "¼"
  881. L189 DC.B       "½"
  882. L190 DC.B       "¾"
  883. L191 DC.B       "¿"
  884. L192 DC.B       "À"
  885. L193 DC.B       "Á"
  886. L194 DC.B       "Â"
  887. L195 DC.B       "Ã"
  888. L196 DC.B       "Ä"
  889. L197 DC.B       "Å"
  890. L198 DC.B       "Æ"
  891. L199 DC.B       "Ç"
  892. L200 DC.B       "È"
  893. L201 DC.B       "É"
  894. L202 DC.B       "Ê"
  895. L203 DC.B       "Ë"
  896. L204 DC.B       "Ì"
  897. L205 DC.B       "Í"
  898. L206 DC.B       "Î"
  899. L207 DC.B       "Ï"
  900. L208 DC.B       "Ð"
  901. L209 DC.B       "Ñ"
  902. L210 DC.B       "Ò"
  903. L211 DC.B       "Ó"
  904. L212 DC.B       "Ô"
  905. L213 DC.B       "Õ"
  906. L214 DC.B       "Ö"
  907. L215 DC.B       "×"
  908. L216 DC.B       "Ø"
  909. L217 DC.B       "Ù"
  910. L218 DC.B       "Ú"
  911. L219 DC.B       "Û"
  912. L220 DC.B       "Ü"
  913. L221 DC.B       "Ý"
  914. L222 DC.B       "Þ"
  915. L223 DC.B       "ß"
  916. L224 DC.B       "À"
  917. L225 DC.B       "Á"
  918. L226 DC.B       "Â"
  919. L227 DC.B       "Ã"
  920. L228 DC.B       "Ä"
  921. L229 DC.B       "Å"
  922. L230 DC.B       "Æ"
  923. L231 DC.B       "Ç"
  924. L232 DC.B       "È"
  925. L233 DC.B       "É"
  926. L234 DC.B       "Ê"
  927. L235 DC.B       "Ë"
  928. L236 DC.B       "Ì"
  929. L237 DC.B       "Í"
  930. L238 DC.B       "Î"
  931. L239 DC.B       "Ï"
  932. L240 DC.B       "Ð"
  933. L241 DC.B       "Ñ"
  934. L242 DC.B       "Ò"
  935. L243 DC.B       "Ó"
  936. L244 DC.B       "Ô"
  937. L245 DC.B       "Õ"
  938. L246 DC.B       "Ö"
  939. L247 DC.B       "×"
  940. L248 DC.B       "Ø"
  941. L249 DC.B       "Ù"
  942. L250 DC.B       "Ú"
  943. L251 DC.B       "Û"
  944. L252 DC.B       "Ü"
  945. L253 DC.B       "Ý"
  946. L254 DC.B       "Þ"
  947. L255 DC.B       "ß"
  948.  
  949. ;---------------------------------------------------------------------------
  950.  
  951. Strings:
  952. S000 DC.B    "",0
  953. S001 DC.B    "Søndag",0
  954. S002 DC.B    "Mandag",0
  955. S003 DC.B    "Tirsdag",0
  956. S004 DC.B    "Onsdag",0
  957. S005 DC.B    "Torsdag",0
  958. S006 DC.B    "Fredag",0
  959. S007 DC.B    "Lørdag",0
  960.  
  961. S008 DC.B    "Søn",0
  962. S009 DC.B    "Man",0
  963. S010 DC.B    "Tir",0
  964. S011 DC.B    "Ons",0
  965. S012 DC.B    "Tor",0
  966. S013 DC.B    "Fre",0
  967. S014 DC.B    "Lør",0
  968.  
  969. S015 DC.B    "Januar",0
  970. S016 DC.B    "Februar",0
  971. S017 DC.B    "Marts",0
  972. S018 DC.B    "April",0
  973. S019 DC.B    "Maj",0
  974. S020 DC.B    "Juni",0
  975. S021 DC.B    "Juli",0
  976. S022 DC.B    "August",0
  977. S023 DC.B    "September",0
  978. S024 DC.B    "Oktober",0
  979. S025 DC.B    "November",0
  980. S026 DC.B    "December",0
  981.  
  982. S027 DC.B    "Jan",0
  983. S028 DC.B    "Feb",0
  984. S029 DC.B    "Mar",0
  985. S030 DC.B    "Apr",0
  986. S031 DC.B    "Maj",0
  987. S032 DC.B    "Jun",0
  988. S033 DC.B    "Jul",0
  989. S034 DC.B    "Aug",0
  990. S035 DC.B    "Sep",0
  991. S036 DC.B    "Okt",0
  992. S037 DC.B    "Nov",0
  993. S038 DC.B    "Dec",0
  994.  
  995. S039 DC.B    "Ja",0
  996. S040 DC.B    "Nej",0
  997.  
  998. S041 DC.B    "AM",0
  999. S042 DC.B    "PM",0
  1000.  
  1001. S043 DC.B    "-",0
  1002. S044 DC.B    "-",0
  1003.  
  1004. S045 DC.B    '"',0
  1005. S046 DC.B    '"',0
  1006.  
  1007. S047 DC.B    "i går",0
  1008. S048 DC.B    "i dag",0
  1009. S049 DC.B    "i morgen",0
  1010. S050 DC.B    "fremtid",0
  1011.  
  1012.     CNOP 0,4
  1013.  
  1014. ;---------------------------------------------------------------------------
  1015.  
  1016. GetLocaleStr:
  1017.     cmp.l    #51,d0     ; 50 being the maximum # of strings
  1018.     bcc.s    1$
  1019.     asl.w    #2,d0
  1020.     move.l  StringTable(pc,d0.w),d0
  1021.     rts
  1022.  
  1023. 1$    moveq    #0,d0
  1024.     rts
  1025.  
  1026. StringTable:
  1027. P000 DC.L S000
  1028. P001 DC.L S001
  1029. P002 DC.L S002
  1030. P003 DC.L S003
  1031. P004 DC.L S004
  1032. P005 DC.L S005
  1033. P006 DC.L S006
  1034. P007 DC.L S007
  1035. P008 DC.L S008
  1036. P009 DC.L S009
  1037. P010 DC.L S010
  1038. P011 DC.L S011
  1039. P012 DC.L S012
  1040. P013 DC.L S013
  1041. P014 DC.L S014
  1042. P015 DC.L S015
  1043. P016 DC.L S016
  1044. P017 DC.L S017
  1045. P018 DC.L S018
  1046. P019 DC.L S019
  1047. P020 DC.L S020
  1048. P021 DC.L S021
  1049. P022 DC.L S022
  1050. P023 DC.L S023
  1051. P024 DC.L S024
  1052. P025 DC.L S025
  1053. P026 DC.L S026
  1054. P027 DC.L S027
  1055. P028 DC.L S028
  1056. P029 DC.L S029
  1057. P030 DC.L S030
  1058. P031 DC.L S031
  1059. P032 DC.L S032
  1060. P033 DC.L S033
  1061. P034 DC.L S034
  1062. P035 DC.L S035
  1063. P036 DC.L S036
  1064. P037 DC.L S037
  1065. P038 DC.L S038
  1066. P039 DC.L S039
  1067. P040 DC.L S040
  1068. P041 DC.L S041
  1069. P042 DC.L S042
  1070. P043 DC.L S043
  1071. P044 DC.L S044
  1072. P045 DC.L S045
  1073. P046 DC.L S046
  1074. P047 DC.L S047
  1075. P048 DC.L S048
  1076. P049 DC.L S049
  1077. P050 DC.L S050
  1078.  
  1079. ;---------------------------------------------------------------------------
  1080.  
  1081. ENDTAG:
  1082.  
  1083. ;---------------------------------------------------------------------------
  1084.  
  1085.     END
  1086.